package com.passion.fs.controller;

import com.passion.fs.vo.GlobalConfigVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 类描述：公共控制器
 *
 * @author ZhuYin
 * @since 2025年01月08日
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    @GetMapping("/globalConfig")
    public GlobalConfigVO globalConfig(HttpServletRequest request) {
        String contextPath = request.getContextPath();
        return GlobalConfigVO.builder().contextPath(contextPath).build();
    }
}
